import 'package:flutter/material.dart';
import 'package:website.core/core/application/blocs/app_navigator_bloc/models/page_models/app_navigator_page_model.dart';

class AppNavigatorPage extends Page {
  AppNavigatorPage({
    required this.pageModel,
    required this.child,
  }) : super(key: ValueKey(pageModel.pageId));

  final AppNavigatorPageModel pageModel;
  final Widget child;

  @override
  Route createRoute(BuildContext context) {
    return PageRouteBuilder(
      settings: this,
      pageBuilder: (context, animation, secondaryAnimation) {
        return child;
      },
      transitionDuration: Duration.zero,
    );
  }
}
